package P083_EnumConstant;

import org.junit.Test;

import java.util.LinkedList;
import java.util.Queue;
import java.util.Random;

/**
 * @Description : 枚举定义常量
 *
 **/
public class EnumConstant {


    @Test
    public void test(){
        System.out.println("春天: "+Season.Spring);
        //枚举内置方法
        for(Season s:Season.values()){
            System.out.println(s);
        }
        //枚举自定义方法
        System.out.println(Season.getComfortableSeason());
    }

    enum Season{
        Spring,Summer,Autumn,Winter;
        public static Season getComfortableSeason(){
            return Spring;
        }
    }


}
